package com.chushouya.order.service.api.impl;

//=====order.service.api.*;
import com.chushouya.order.service.api.*;
import com.chushouya.order.service.api.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

@Service
public class AlipayOpenMiniOrderServiceImpl implements AlipayOpenMiniOrderService {

    @Resource
    private AlipayOpenMiniOrderCreateService alipayOpenMiniOrderCreateService;

    @Resource
    private AlipayOpenMiniOrderDeliveryModifyService alipayOpenMiniOrderDeliveryModifyService;

    @Resource
    private AlipayOpenMiniOrderDeliverySendService alipayOpenMiniOrderDeliverySendService;

    @Resource
    private AlipayOpenMiniOrderDeliveryReceiveService alipayOpenMiniOrderDeliveryReceiveService;

    @Resource
    private AlipayOpenMiniOrderCloseService alipayOpenMiniOrderCloseService;




    @Override
    public void processOrderCreate(Long orderId) {
        alipayOpenMiniOrderCreateService.createOpenMiniOrder(orderId);
    }

    /**
     * 处理订单确认
     *
     * @param orderId 订单ID
     */
    @Override
    public void processOrderConfirm(Long orderId) {
        alipayOpenMiniOrderDeliveryModifyService.confirmOrder(orderId);
    }

    /**
     * 处理订单发货
     *
     * @param orderId 订单ID
     */
    @Override
    public void processOrderDeliverySend(Long orderId,Long finishAllDelivery) {
        alipayOpenMiniOrderDeliverySendService.orderDeliverySend(orderId,finishAllDelivery);
    }

    /**
     * 处理订单签收
     *
     * @param orderId 订单ID
     */
    @Override
    public void processOrderDeliveryDelivery(Long orderId) {
        alipayOpenMiniOrderDeliveryReceiveService.orderDeliveryReceive(orderId);
    }

    /**
     * 处理订单取消
     *
     * @param orderId 订单ID
     */

    @Override
    public void processOrderCancel(Long orderId) {
        alipayOpenMiniOrderCloseService.orderClose(orderId);
    }

    /**
     * 处理订单质检
     *
     * @param orderId 订单ID
     */

    @Override
    public void processOrderQuality(Long orderId) {
        alipayOpenMiniOrderDeliveryModifyService.confirmOrder(orderId);
    }
}
